#include <stdio.h>  
  
int main() {  
    char op;  
    double a, b, result;  
  
    printf("请输入运算符（+、-、*、/）：");  
    scanf("%c", &op);  
  
    printf("请输入两个数字：");  
    scanf("%lf %lf", &a, &b);  
  
    switch(op) {  
        case '+':  
            result = a + b;  
            break;  
        case '-':  
            result = a- b;  
            break;  
        case '*':  
            result = a * b;  
            break;  
        case '/':  
            if (b == 0) {  
                printf("除数不能为0！\n");  
                return 1;  
            }  
            result = a / b;  
            break;  
        default:  
            printf("无效的运算符！\n");  
            return 1;  
    }  
  
    printf("%.2lf %c %.2lf = %.2lf\n", a, op, b, result);  
  
    return 0;  
}